<?php
//atributos form datos
$atrFrm = array('class' => 'form-horizontal', 'id' => 'frm_config_gral');
$atrInpDate = array('class' => 'input-small','type' => 'text','name' =>'fecha_ingreso','readonly' => 'readonly','value' => $hoy);
$atrInpName = array('class' => 'input-xxlarge','type' => 'text','name' =>'nomb_clie','value' => set_value('nomb_clie'),);
$atrInpApe = array('class' => 'input-xxlarge','type' => 'text','name' =>'apel_clie','value' => set_value('apel_clie'),);
$atrInpDire = array('class' => 'input-xxlarge','type' => 'text','name' =>'dire_clie','value' => set_value('dire_clie'),);
$atrInpTel = array('class' => 'input-xxlarge','type' => 'text','name' =>'telf_clie','value' => set_value('telf_clie'),);
$atrInpEmail = array('class' => 'input-xxlarge','type' => 'text','name' =>'email_clie','value' => set_value('email_clie'),);
$atributoslbl = array( 'class' => 'control-label');
//usuario
$atrInpUsername = array('class' => 'input-large','type' => 'text','name' =>'username', 'placeholder' => 'username@email.com','value' => set_value('username'),);
$atrInpPass = array('class' => 'input-large','type' => 'text','name' =>'userpass','value' => set_value('userpass'),);

$atrBtn = array('class' => 'btn btn-inverse','type' => 'submit');
//formulario de datos
echo form_open('clientesucursal/insert_clie',$atrFrm);
echo form_fieldset('Agregar Nuevo Cliente');
?>
<p class="muted">Datos Personales</p>
    <div class="control-group">
          <?php echo form_label('Fecha de ingreso','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpDate); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Nombre','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpName); ?>
            <?php echo form_error('nomb_clie'); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Apellido','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpApe); ?>
            <?php echo form_error('apel_clie'); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Dirección','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpDire); ?>
            <?php echo form_error('dire_clie'); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Teléfono','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpTel); ?>
            <?php echo form_error('telf_clie'); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Email','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpEmail); ?>
            <?php echo form_error('email_clie'); ?>
        </div>
    </div>
<p class="muted">Datos de Acceso</p>
    <div class="control-group">
          <?php echo form_label('Username(Formato Email)','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpUsername); ?>
            <?php echo form_error('username'); ?>
        </div>
    </div>
    <div class="control-group">
          <?php echo form_label('Password','',$atributoslbl);?>
        <div class="controls">
            <?php echo form_input($atrInpPass); ?>
            <?php echo form_error('userpass'); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo form_label('Tipo de usuario','',$atributoslbl);?>
        <div class="controls">
            <select class="" name="level" id="level">
                  <?php foreach($level as $fila){ ?>
                  <option value="<?php echo $fila->id_level ?>"> <?php echo $fila->desc_level ?></option>
                  <?php }?>        
            </select>
        </div>
    </div>
<?php
echo form_button($atrBtn,'Agregar Cliente');
echo form_fieldset_close(); 
echo form_close();
?>



